from flask import Flask
from .command import register_commands
from .config import register_configuration
from .extends import register_extends
from .http import register_routes


def create_app():
    app = Flask(
        __name__,
        template_folder='../public/templates',
        static_folder='../public/static',
        static_url_path='/public/static'
    )

    register_commands(app)
    register_configuration(app=app)
    register_extends(app)
    register_routes(app)
    return app



